package hackathon.light.up;

import java.util.ArrayList;
import java.util.Vector;

import android.graphics.Color;
import android.util.Log;
import android.view.MotionEvent;

import com.e3roid.E3Scene;
import com.e3roid.drawable.Shape;
import com.e3roid.drawable.Sprite;
import com.e3roid.drawable.texture.AssetTexture;
import com.e3roid.drawable.texture.Texture;
import com.e3roid.event.ShapeEventListener;

public class LightSource {
	public int pos_row, pos_col;
	public LightDirection direction;
	public int color_id;
	//public Shape light_source;
	public Light light;
	public boolean flagOn = false;
	//flag on sau off
	public LightSource(int row, int col, LightDirection dir, int color){
		this.pos_col = col;
		this.pos_row = row;
		this.direction = dir;
		this.color_id = color;
		flagOn = false;
	}
	
	public void drawLight(int end_row,int end_col) {
		light = new Light(3, pos_row, pos_col, end_row, end_col, color_id);
	}
	
	public Shape getLight(){
		if(light !=null)
			return light.getShape();
		else
			return null;
	}
	
	
	public void draw(E3Scene scene) {
		if(light.getShape()!= null)
			scene.getTopLayer().add(light.getShape());
		//scene.getTopLayer().add(light_source);
		//scene.getTopLayer().add(robot);
		
		
	}
	
	
}
